]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
meson: Avoid glibc-specifics when not using glibc
authorDaniel van Vugt <daniel.van.vugt@canonical.com>
Thu, 12 Jun 2025 05:34:29 +0000 (13:34 +0800)
committerFlorian Müllner <fmuellner@gnome.org>
Sat, 28 Jun 2025 10:23:55 +0000 (12:23 +0200)
This also requires Meson 1.3 to use compiler.has_define.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/8457
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3748>
(cherry picked from commit efb1c8cb69c05e9ed86dfc071d22143a69afefbe)

meson.build

index f3158a1f2b74bdce79f0b8fbc26cdb9ba58ca005..73a74772377263fcac3e0d895a85ab65d541a920 100644 (file)
@@ -1,6 +1,6 @@
 project('gnome-shell', 'c',
   version: '48.2',
-  meson_version: '>= 1.1.0',
+  meson_version: '>= 1.3.0',
   license: 'GPL-2.0-or-later',
 )
 
@@ -164,7 +164,10 @@ cdata.set('HAVE_MALLINFO', cc.has_function('mallinfo'))
 cdata.set('HAVE_MALLINFO2', cc.has_function('mallinfo2'))
 cdata.set('HAVE_SYS_RESOURCE_H', cc.has_header('sys/resource.h'))
 cdata.set('HAVE_EXE_INTROSPECTION',
-  cc.has_header('elf.h') and cc.has_header('link.h'))
+  cc.has_header('elf.h') and
+  cc.has_header('link.h') and
+  cc.has_define('__GLIBC__', prefix: '#include <link.h>')
+)
 cdata.set('HAVE__NL_TIME_FIRST_WEEKDAY',
   cc.has_header_symbol('langinfo.h', '_NL_TIME_FIRST_WEEKDAY')
 )